package cn.edu.nwafu.hjpg.dao;

import cn.edu.nwafu.hjpg.entity.Element;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @author Johnny
 * @title: ElementDao
 * @description: TODO
 * @date 8/24/202010:46 AM
 */
public interface ElementDao extends MongoRepository<Element,String> {
    Element findElementByBaseinfoWzbm(String id);
    Page<Element> findElementsByBaseinfoTypeAndBaseinfoCasLikeOrBaseinfoZwmcLikeOrBaseinfoWzbmLike(String baseinfoType,String baseinfoCas, String baseinfoZwmc,String baseinfoWzbm, Pageable pageable);
    List<Element> findAllByBaseinfoCas(String baseinfoCas);
    void deleteElementByBaseinfoWzbm(String baseinfoWzbm);
    Page<Element> findAllByBaseinfoTypeAndBaseinfoWzbmLikeOrBaseinfoCasLike(String type,String baseinfoWzbm, String baseinfoCas,Pageable pageable);

}
